Method and device for preparing error map and numerically controlled machine tool having error map preparation function

ABSTRACT

In a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, a position error and an attitude error produced by an operation of a linear feed axis and a rotational feed axis are measured at a plurality of measurement points set within a movable range of the linear feed axis and the rotational feed axis, and the position error and the attitude error thus measured are stored as an error map in correspondence to a position of the linear feed axis and a rotation angle of the rotational feed axis.

FIELD OF THE INVENTION

The present invention relates to measurement and correction of an error in a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other.

BACKGROUND ART

In a machine tool which has a linear feed axis and a rotational feed axis, it is generally difficult to position a tool at a desired position since an error may occur when the feed axes are moved in accordance with a movement command. Therefore, when highly precise processing is desired, correction has to be carried out depending on the machine error. In order to carry out the correction, the machine error needs to be measured accurately as a preliminary step of correction. The following documents disclose the prior art of measurement and correction of errors.

In Japanese Patent Publication of Examined Patent Application (Kokoku Publication) No. H06-088192 (JP-H06-088192 B1), a method is disclosed in which deviations of two rotational feed axes (deviation of the position of the center of axes) of a machine tool which has two rotational feed axes (A, B) that are orthogonal to each other are measured in advance, and coordinates of the two rotational feed axes are determined by taking these deviations into account.

In Japanese Patent Publication of Unexamined Patent Application (Kokai Publication) No. 2004-272887 (JP-2004-272887-A1), a method is disclosed in which, in a machine tool which has three linear feed axes (X, Y, Z) that are orthogonal to each other and two rotational feed axes (A, C) that are orthogonal to each other, the position to which the machine has to be actually moved is determined based on deviations of the center of a rotating shaft or the center of turning of a spindle, and by using drive control means, the linear feed axes and the rotational feed axes are moved to the determined position so as to correct the position of the tool tip.

In Japanese Patent Publication of Unexamined Patent Application (Kokai Publication) No. H09-237112 (JP-09-237112-A1), a method is disclosed in which an error of a tool unit of a machine tool having a parallel link mechanism is corrected based on an error map. The error map has error data corresponding to each lattice point that have been calculated by computation from the difference between the command value of a position and a posture for tool tip of the tool unit and the measured value of them.

In the pamphlet of WO 2004/034164, a system and a process for measuring, correcting and testing numerically controlled machine tool heads and/or tables are disclosed which are automated and integrated in a numerically controlled system. This system comprises at least one support base that is equipped with a plurality of distance sensors, and at least one device of gauge tool type that is equipped with connection means for the heads at one of its ends and with a ball at another opposite end. The ball is placed next to the distance sensors, so that the distance sensors are able, at any time and in any position, to move to any position in order to measure the distance that separates them from the ball, and to thereby determine the position in the Cartesian space.

In the correction methods disclosed in JP-H06-088192 B1 and JP-2004-272887 A1, deviation of the rotational axis is corrected. Thus, there is a problem that errors or the like which vary depending on the undulation of the rotational axis itself or on the position of the linear feed axis cannot be corrected. The error map disclosed in JP-H09-237112 A1 is the error of the tip of a tool unit that is driven by a parallel link mechanism obtained as table data. Thus, there is a problem that this method is not applicable to a machine tool which has a linear feed axis and a rotational feed axis. In the measurement method disclosed in the pamphlet of WO 2004/034164, only the center position of a reference ball is measured, so that there is a problem that deviation of the position of the tool tip produced due to an error of the posture of the main spindle relative to the table due to variation of the tool length or projecting length of the tool cannot be corrected.

DISCLOSURE OF THE INVENTION

The present invention aims to resolve above-described problems associated with prior art, and therefore, it is an object of the present invention to provide a method and a device for preparing an error map in order to correct with high precision a machine tool error which has a linear feed axis and a rotational feed axis, and a numerically controlled machine tool having an error map preparation function.

In order to attain above-described object, in accordance with the present invention, there is provided a method for preparing an error map of a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, the method comprising steps of; defining a plurality of measurement points in the movable range of the linear feed axis and the rotational feed axis, measuring the relative position and the relative attitude of the main spindle relative to the table at the defined measurement points, determining a position error and/or an attitude error at each measurement point from the measured relative position and/or relative attitude and the command data for positioning the feed axes, and storing the position error and the attitude error corresponding to the position of the linear feed axis and the rotation angle of the rotational feed axis.

In accordance with the present invention, there is also provided a method for preparing an error map, wherein, in the step of defining a plurality of measurement points, plural measurement regions are defined in the movable range of the linear feed axis, and the measurement points are defined in each measurement region such that at least one measurement point in each measurement region is defined so as to have a same coordinate position of the linear feed axis as a measurement point in adjacent measurement region.

In accordance with the present invention, there is also provided a method for preparing an error map, wherein, in the step of defining a plurality of measurement points, the measurement points are defined such that separation between adjoining measurement points is constant everywhere, or a difference in the position error or the attitude error between adjoining measurement points is constant everywhere.

In accordance with the present invention, there is also provided a method for preparing an error map, wherein, in the step of measuring relative position or relative attitude, a reference ball having known outer dimension provided on one of the main spindle and the table and a measuring device having a displacement sensor provided on the other are used, and while the linear feed axis is controlled such that relative position of the center of the reference ball and the displacement sensor does not change theoretically when the rotational feed axis is operated, the rotational feed axis is positioned at a plurality of measurement points, and displacement of position of the reference ball is measured with the displacement sensor at each measurement point to determine the relative position and the relative attitude from the displacement thus measured and the coordinate value at the time of measurement.

In accordance with the present invention, there is also provided a method for preparing an error map, wherein, in the step of measuring the relative position or the relative attitude, a test piece or a work piece attached to the table is processed with the rotational feed axis positioned at a plurality of rotation angles, and displacement of the processed surface obtained when the rotational feed axis is positioned at one of the plural rotation angles and the test piece or work piece is processed at the one rotation angle and the processed surface obtained when processed at another rotation angle is measured to determine the relative position and the relative attitude from the displacement thus measured and the coordinate value at the time of measurement.

In accordance with the present invention, there is also provided a method for preparing an error map, wherein, in the step of measuring the relative position or the relative attitude, three surfaces of a test piece or a work piece attached to the table are processed with the rotational feed axis positioned at a plurality of rotation angles, difference of position and difference of inclination between the three processed surfaces obtained when the rotational feed axis is positioned at one of the plurality of rotation angles and is processed at the rotation angle and the three processed surfaces obtained when processed at another rotation angle are measured with a touch probe mounted on the main spindle to determine the relative position and the relative attitude from the difference of position and difference of inclination thus measured and the coordinate value of the machine at the time of measurement.

In accordance with the present invention, there is also provided a method for preparing an error map for a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, the method comprising the steps of; defining a plurality of measurement points in the movable range of the linear feed axis and the rotational feed axis, positioning at the defined measurement points the rotational feed axis at plural rotation angles and, at each of the positioned rotation angles, processing three mutually orthogonal surfaces of a test piece or a work piece in the form of rectangular parallelepiped attached to the table, determining the attitude error at each rotation angle by measuring the inclination of the processed surfaces obtained when the rotational feed axis is positioned at one of the plural rotation angles and the test piece or work piece is processed at the one rotation angle relative to that obtained by positioning at another rotation angle, measuring the processed surfaces of the processed test piece or work piece, and at each rotation angle, determining the position of intersection point of three planes containing the processed surfaces processed at the rotation angle, determining the position error at each measurement point from the difference of position between the intersection point of three planes containing the processed surfaces obtained when the rotational feed axis is positioned at one of the rotation angles and the test piece or work piece is processed at the one rotation angle and the intersection point of three planes containing the processed surfaces obtained when positioned and processed at another rotation angle and the determined attitude difference, and storing the position error and the attitude error in correspondence to the position of the linear feed axis and the rotation angle of the rotational feed axis.

In accordance with the present invention, there is also provided a method for preparing an error map of a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, the method comprising the steps of; defining a plurality of measurement points in the movable range of the linear feed axis and the rotational feed axis, positioning at the defined measurement points the rotational feed axis at plural rotation angles and, at each of the positioned rotation angles, processing three mutually orthogonal surfaces of a test piece or a work piece in the form of rectangular parallelepiped attached to the table, measuring the processed surfaces of the processed test piece or work piece to determine, for each rotation angle, the inclination of processed surfaces processed at the rotation angle and the position of the intersection point of the three planes containing the processed surfaces, determining the attitude error at each measurement point from the difference between the inclination of the processed surfaces obtained when the rotational feed axis is positioned at one of the plural rotation angles and the test piece or the work piece is processed at the one rotation angle and the inclination of the processed surfaces obtained when positioned and processed at other rotation angle, determining the position error at each measurement point from the difference between the position of the intersection point of the three planes containing the processed surfaces obtained when the rotational feed axis is positioned at the one of the plural rotation angles and the test piece or the work piece is processed at the one rotation angle and the position of the intersection point of the three planes containing the processed surfaces obtained when positioned and processed at an other rotation angle and the determined attitude error, and storing the position error and the attitude error in correspondence to the position of the linear feed axis and the rotation angle of the rotational feed axis.

In accordance with the present invention, there is also provided a device for preparing an error map for a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, the device comprising; a measurement device having a reference ball provided on one of the main spindle and the table and a sensor provided on the other for measuring the position of the reference ball with the sensor at desired measurement points, a computation section for computing the position error and the attitude error of the main spindle and the table based on measurement data measured with the measurement device and the coordinate values of the measurement points, and a storage section for storing the position error and the attitude error which are computed by the computation section in correspondence to the position of the linear feed axis and the rotation angle of the rotational feed axis at the measurement point.

In accordance with the present invention, there is also provided, in a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, a numerically controlled machine tool having error map preparation function comprising; a measurement device having a reference ball provided on one of the main spindle and the table and a sensor provided on the other for measuring the position of the reference ball with the sensor at desired measurement points, a computation section for computing the position error and the attitude error of the main spindle and the table based on measurement data measured with the measurement device and the coordinate values of the measurement points, and a storage section for storing the position error and the attitude error which are computed by the computation section in correspondence to the position of the linear feed axis and the rotation angle of the rotational feed axis at the measurement point.

Also, in accordance with the present invention, there is provided, in which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, a numerically controlled machine tool having error map preparation function comprising; a measurement device having a test piece or work piece attached to the table and a sensor provided on the main spindle for measuring the processed surface of the test piece or work piece at a desired measurement point, a computation section for computing the position error and the attitude error of the main spindle and the table based on measurement data measured with the measurement device and the coordinate values of the measurement points, and a storage section for storing the position error and the attitude error which are computed by the computation section in correspondence to the position of the linear feed axis and the rotation angle of the rotational feed axis at the measurement point.

Also, in accordance with the present invention, there is provided a numerically controlled machine tool having error map preparation function, wherein the numerically controlled machine tool further comprises a correction section which corrects the command position or position command for the linear feed axis or the rotational feed axis based on the position error and the attitude error stored in the storage section.

In accordance with the method and the device for preparing an error map and a numerically controlled machine tool having error map preparation function of the present invention, an error map can be prepared by measuring the position error and the attitude error of the numerically controlled machine tool which has a linear feed axis and a rotational feed axis. In an error map prepared in accordance with the present invention, error data for the position error and the attitude error that change as the feed axes are moved are stored separately, and the position command is corrected based on the error data. Therefore, in accordance with the present invention, even when the tool length or the tool projecting length varies, the tool tip or the processing point of the tool can be positioned to the target position with high precision. In case where measurement points are set such that the coordinate position of the linear feed axis is the same in adjoining measurement regions, influence of mounting error of the measurement device can be eliminated. In case where separation between adjoining measurement points is set such that the difference of error is constant everywhere, the amount of data of the error map can be reduced while maintaining the precision of correction. In case where an error map is prepared by measuring the processed test piece or work piece, errors produced due to deflection of the main spindle or the tool due to rotation of the main spindle, flexure of the machine or the tool due to load, or the like, can be corrected.

In the present invention, the term “command position” refers to the position of the destination point of the feed axis commanded by a processing program, and the term “position command” refers, from among the command pulses issued from the interpolation section to the servo section based on command position, command velocity, and the like, to the command for controlling the position of the feed axis.

BRIEF DESCRIPTION OF DRAWINGS

Above and other objects, features and advantages of the present invention will become more apparent from the following description of preferred embodiments with reference to appended drawings, in which:

FIG. 1 is a side view showing a numerically controlled machine tool according to the present invention;

FIG. 2 is a block diagram showing a numerical control device of the numerically controlled machine tool according to an embodiment of the present invention;

FIG. 3 is a view of lattice points in 3-dimensional Cartesian coordinate space;

FIG. 4 is a view of 2-dimensional data sheet (map data) associated with each lattice point of FIG. 3;

FIG. 5 is a view of a reference ball attached to the tip of a tool as it is measured with a measurement device mounted on a palette;

FIG. 6 is a view showing the measurement range of reference balls having support shafts of different length as seen from the direction of Y-axis;

FIG. 7 is a view of a method for determining plural measurement regions;

FIG. 8 is a flow chart useful for explaining a first measurement method for measuring a position error and an attitude error;

FIG. 9 is a detailed flow chart showing M3 of the flow chart of FIG. 8;

FIG. 10 is a view of the attitude error expressed in two variables;

FIG. 11 is a view showing an example of a spindle rotation type machine having a reference ball attached to the palette side and a measurement device mounted on the main spindle side;

FIG. 12 is a view showing an example of a table rotation type machine having a measurement device mounted on the table and a reference ball attached to the main spindle;

FIG. 13 is a flow chart of a second measurement method for measuring a position error and an attitude error;

FIG. 14 is a view of a state in which each surface is processed only with operation of the linear feed axes;

FIG. 15 is a developed view of five surfaces of a rectangular parallelopiped showing the area to be processed for each indexed angle;

FIG. 16 is a view of a state in which a work piece is processed into a lattice-like face at the indexed angle for the rotational feed axes B, C;

FIG. 17 is a view of a state in which each measurement surface indexed at a specified angle is being measured;

FIG. 18 is a view of a method for determining an intersection point of three planes; and

FIG. 19 is a flow chart showing an example of correction method using an error map.

BEST FORM FOR IMPLEMENTING THE INVENTION

The present invention will be described below with reference to appended drawings showing preferred embodiments thereof. A numerically controlled machine tool according to the present invention comprises a numerical control device for controlling an operation of a machine in accordance with a processing program. In FIG. 1, the construction of a five-axis horizontal type machining center having two rotational feed axes on the main spindle side, is shown. Referring to FIG. 1, machining center 1 comprises bed 2 provided on the floor, column 3 that is erected on bed 2 and is capable of being moved linearly in a direction of Z-axis, and main spindle stock 5 that is capable of being moved linearly in a direction of Y-axis which is perpendicular to the direction of column 3. On main spindle stock 5, a bracket 5 a is supported rotatably about C-axis which is parallel to Z-axis. On bracket 5 a, main spindle head 4 is supported rotatably about A-axis which is parallel to X-axis. On main spindle head 4, a main spindle for holding a tool is rotatably supported.

Machining center 1 is erected on bed 2 at a position opposed to main spindle head 4, and comprises table 6 that is capable of being moved linearly in a direction of X-axis which is perpendicular to the paper surface. work piece 7 is held via angle plate (equerre) 8 on table 6.

FIG. 2 is a block diagram showing the construction of numerical control device 20 that controls the position of feed axes of the machine tool.

Numerical control device 20 shown in FIG. 2 has the function of correcting position error and attitude error of the machine tool, and comprises reading and interpreting section 22 that reads and interprets processing program 21 to compute a command velocity and a command position for each feed axis, interpolating section 23 that computes command pulses based on the command position, command velocity, and the like to perform linear interpolation or circular interpolation of feed for each feed axis, position command recognition means 24 that obtains the command pulses and recognizes a position command for each feed axis, a computation section that computes a position error and an attitude error for a measurement point based on measurement data measured with measurement device 50 and the coordinates of the measurement point, error data storage means 25 that store the position error and the attitude error computed by the computation section in correspondence to the position of the linear feed axis and the rotation angle of the rotational feed axis, correction data computing section 26 that computes correction data for correcting the position command from the position command and the error data stored in error data storage means 25, correction pulse computation means 27 that determine a correction pulse for correcting the position command based on the correction data, and addition means 28 that output the pulse obtained by adding the correction pulse to the command pulse to servo section 29.

Motor 30 for each feed axis is driven by the drive current which is amplified by servo section 29 to thereby move the feed axis. Servo section 29 controls based on the velocity feedback from motor 30 and the position feedback from an unshown position detecting device such that each feed axis is moved at desired velocity to desired position.

The present invention also includes a device that is constructed such that the command position is obtained from reading and interpreting section 22 for correction, and the corrected command position is inputted into the interpolation section for the motor to move the machine to desired position.

Next, a method for preparing an error map will be described. In an error map, as shown in FIG. 3, lattice points 31 are set at desired positions in a direction of each axis of linear feed axes X, Y, Z in Cartesian coordinate system, and 2-dimensional array data 33 corresponding to the rotation angle of the rotational feed axes are associated with respective lattice points as shown in FIG. 4. Thus, an error map is composed as 5-dimensional array data of X, Y, Z, A, C.

An error map is composed of plural error data 34 obtained by measurement with each feed axis positioned at desired measurement points. Error data 34 are composed of position error 34 a and attitude error 34 b.

Position error 34 a refers to an error in relative position of the main spindle relative to the table, that is, an error of the position expressed as 3-dimensional coordinate value (x, y, z) produced when the feed axes are positioned at specified positions or rotation angles. That is, a position error is the difference between the theoretical position commanded by the position command and the actual position.

Attitude error 34 b refers to an error in relative attitude of the main spindle relative to the table, that is, an error expressed as inclination angles produced when the feed axes are positioned at specified positions or rotation angles. Thus, an attitude error is the difference between the theoretical inclination commanded by the position command and the actual inclination.

Measurement spacing of error data 34 is set such that the difference of position error 34 a or attitude error 34 b between adjoining measurement points becomes equal to a specified value. In other words, if the difference of error between adjoining measurement points is small, the measurement spacing is broadened, and if the difference of error is large, the measurement spacing is narrowed. By broadening the measurement spacing in the portion of small difference of error, amount of data can be reduced and load on memory can be thereby reduced. By narrowing the measurement spacing in the portion of large difference of error, precision of the correction of error can be kept high.

Next, an example of measurement method for measuring position error 34 a and attitude error 34 b of a machine tool which has rotational feed axes A, C on the main spindle side, will be described. As shown in FIGS. 5 and 6, measurement device 50 is mounted via support shaft 40 to the main spindle of the spindle rotation type machine tool, and comprises reference ball 52 which has known values of outer dimension and of distance L1, L2 from the control point to ball center P1, P2, and sensor bracket 53 which is mounted on palette 54 fixed to the table and has non-contact type sensors 55 in X-direction, Y-direction, Z-direction. The non-contact type sensor 55 can measure the distance to the reference ball 52 in each direction in non-contacting manner. The sensor of the present invention includes not only non-contact type sensor but also contact type sensor.

Measurement is performed by dividing the measurement range of rotational feed axis A, C in even pitch or in uneven pitch, and operating, at the same time, the linear feed axis so as to maintain the center position of reference ball 52 at each division point (measurement point). As used herein, the term “even pitch” means that a measurement point is defined at every specified angle so that an angular separation between adjoining measurement points is everywhere equal, and the term “uneven pitch” means that error data are obtained only at points where error exceeds a certain defined value so that an angular separation between adjoining measurement points is generally unequal.

As shown in FIG. 9, center position P1 of reference ball 52 is measured in directions X, Y, Z that are orthogonal to each other using measurement device 50 equipped with non-contact type sensors 55. In order to determine actual relative attitude and actual control point, the reference ball having support shaft 40 of different length is attached as shown in FIG. 6, and center position P2 of reference ball 52 is measured again. By attaching support shafts 41 a, 41 b of different lengths for measurement, relative attitude of the main spindle and the table can be determined.

The present invention includes the use of a support shaft whose length can be adjusted. In the present embodiment, the control point is set at the intersection point of the rotation center of first rotational feed axis C and the rotation center of second rotational feed axis A. As used herein, the term “relative attitude” refers to the relative inclination of the main spindle and the table.

Sensor bracket 53 of measurement device 50 is mounted rotatably about an axis that is parallel to Z-axis. Thus, when measurement is to be performed over entire 360 degrees, the sensor bracket can be rotated about the axis that is parallel to Z-axis by 90 degrees four times to perform measurement.

As shown in FIGS. 7 and 8, when the region to be measured is large, measurement can be performed by dividing the region into plural measurement regions. In this case, in first measurement region 70 a, which is to be used as a reference, operating ranges of linear feed axes X, Y, Z are measured with a laser gauge, an indicator, or the like, and adjustment is performed to obtain adequate precision as required. The present invention includes a case where adjustment of the precision of the operating ranges of linear feed axes X, Y, Z in first measurement region 70 a is not performed, and error is computed taking into account the result of the measurement. This is intended to restrict the result of measurement in first measurement region 70 a to the error produced when rotational feed axes A, C are rotated.

The measurement points in measurement regions 70 a, 70 b are defined such that there exists at least one measurement points 71 having the same coordinate value of the linear feed axes as the measurement points in the adjoining measurement region. This is because an error in mounting measurement device 50 should not influence the result of measurement between first measurement region 70 a and other measurement region 70 b.

The error in mounting measurement device 50 can be determined by subtracting the error due to difference of the rotation angle of the rotational feed axes from the difference of the result of measurement between measurement points having same coordinate value of the linear feed axes. By subtracting this error in mounting from the result of measurement in each measurement region, same result of measurement can be obtained as if all the measurement regions are measured in one proper arrangement.

Next, a method for computing the position error and the attitude error will be described. First, the attitude error is determined as follows. Commanded relative inclination of the main spindle relative to the table is determined from the command value of the rotation angles of rotational feed axes A, C. Here, the angle formed by the rotation axis of the main spindle and the normal (perpendicular line) to the work piece attaching surface of the angle plate (equerre) is taken as the relative attitude of the main spindle and the table. From center positions P1, P2 of reference ball 52 at two measured points, a line is determined that passes through points P1, P2, and the angle formed by this line and the normal to the work piece attaching surface of the angle plate (equerre) is taken as the actual relative inclination of the main spindle relative to the table. Difference between the commanded relative inclination of the main spindle relative to the table and the actual relative inclination of the main spindle relative to the table is determined as the attitude error. The attitude error is expressed by the angle difference i relative to Z-axis as seen from X-axis direction, the angle difference j relative to Z-axis as seen from Y-axis direction, and the angle difference k relative to Y-axis as seen from Z-axis direction. The present invention includes a case where, as shown in FIG. 10, the attitude error is expressed by two angles I, J.

Next, the position error is determined as follows. In the present embodiment, the control point is set at the intersection point of the rotation center of first rotational feed axis C and the rotation center of second rotational feed axis A. Thus, to whatever rotation angle the rotational feed axes are moved, the theoretical position of the control point does not change. The commanded position of the control point is determined from the command values of linear feed axes X, Y, Z. The position of the control point refers to the relative position of the reference point of the table relative to the control point of the main spindle. On the line passing through the points P1 and P2 that is determined in the above-described step of determining the attitude error, the position of a point at a distance L2 in the direction from P2 to P1 is determined and is taken as the actual position of the control point. A vector from the position of the commanded control point to the position of the actual control point is determined and is taken as the position error. The position error vector can be split into components in the direction of X-axis, Y-axis, Z-axis, and is expressed in the form of (x, y, z). The present invention includes a case where the position error vector is expressed in other form.

FIG. 11 is a view showing an embodiment in which, in a spindle rotation type machine, reference ball 52 is attached to the side of palette 54 and displacement detection probe 58 is mounted on the spindle side. Displacement detection probe 58 is constructed such that it is displaced in a direction of the normal at the measurement point of the object to be measured, and the amount of the displacement is detected.

FIG. 12 is a view showing an embodiment in which the present invention is applied to a table rotation type machine having rotational feed axes B, C on the table side. In the embodiments shown in FIGS. 11 and 12, the error of the feed axes can be measured based on the same principle as in the embodiment shown in FIG. 5.

Next, an example of measurement method for measuring position error 34 a and attitude error 34 b of a machine tool having rotational feed axes B, C on the table side will be described. FIG. 13 is a flow chart showing this measurement method. In this measurement method, without using any special measurement device, a test piece or a work piece is processed on the machine, and the processed test piece or work piece is measured with a touch probe mounted on the main spindle to thereby determine the position error and the attitude error. A cubic test piece is used in the present embodiment.

As shown in FIG. 13, rotational feed axes B, C are indexed to sufficiently small rotation angle (in this case, 0 degree for axis B, 0 degree for axis C) as required for sufficient precision of the position error and the attitude error, and as shown in FIG. 14, each surface of test piece 60 (frame-like reference processing surface 61) having X, Y, Z-axis directions as the normal is processed without operating the rotational feed axes.

The reason why reference processing surface 61 is frame-like is that the attitude error can be thereby accurately determined even when a large number of measurement points are used, and the attitude error can be determined more accurately by using the entire length of the test piece to measure the inclination. Here, a ball end mill is used as cutting tool 63. Reference processing surface 61 is used as the reference for measuring the attitude error at a specified rotation angle of the rotational feed axes.

Then, as shown in FIG. 16, the rotational feed axes are indexed to each measurement point, and three surfaces of the test piece that are orthogonal to each other are processed by operating only the linear feed axes. As shown in FIG. 15, a specified area is allotted as the area to be processed in accordance with the indexed angle of the rotational feed axis.

Next, as shown in FIG. 17, the rotational feed axes are indexed to each measurement point, and P10-P14 of reference processing surface 61 are measured with touch probe 64, and actual inclination of the line passing through P10 and P11, actual inclination of the line passing through P10 and P12, and actual inclination of the line passing through P13 and P14 are determined. Difference between three inclinations thus determined and three theoretical inclinations computed from position command of the rotational feed axes at the time of measurement is taken as the attitude error.

Then, as shown in FIG. 18, the rotational feed axes are indexed to the reference rotation angle of 0 degree for B-axis and 0 degree for C-axis, and processed surface P15-P20 that are processed at each rotation angle are measured, and difference between the positions of processed surfaces P18-P20 that are processed with the rotational feed axis indexed to 0 degree for B-axis and 0 degree for C-axis and the positions of processed surfaces P15-P17 that are processed with the rotational feed axis indexed to other rotation angle is determined.

In the present invention, the difference of positions and/or difference of inclinations between the processed surfaces that are processed at one rotation angle and the processed surfaces that are processed at other rotation angle are referred to as the displacement of the processed surfaces.

From measurement data of the processed surfaces P18-P20, intersection point P21 of three planes containing processed surfaces P18-P20 when it is assumed that there is no attitude error is determined. From measurement data of processed surfaces P15-P17 and the determined attitude error, intersection point P22 of three planes containing processed surfaces P15-P17 is determined. Difference between intersection point P21 and intersection point P22 is taken as the position error. The present invention includes a case where a test piece or a work piece is processed with a machine tool having rotational feed axes on the main spindle side, and the position error and the attitude error are determined from measurement result of the processed surfaces.

Error determined by the above-described method is associated with the positions of linear feed axes X, Y, Z and the rotation angles of rotational feed axes B, C, as shown in FIG. 4, and is stored as an error map.

Next, a correction method for correcting the position command using an error map including the position error and the attitude error will be described taking a spindle rotation-type machine which has rotational feed axes A, C (see FIGS. 1 and 2) as an example.

First, the command position of processing program 21 is read by reading and interpreting section 22, and interpolation section 23 determines the command pulse for each of feed axes X, Y, Z, A, C for every specified interpolation period.

Then, position command recognition means 24 recognize from the command pulses the position command for each of feed axes X, Y, Z, A, C for every specified interpolation period.

If the position of each feed axis in the position command is the same as the position of the measurement point stored in error data storage section 25, error data 34 are obtained, and correction data are determined based on the obtained error data. If the position of each feed axis in the position command is not the same as the position of the measurement point stored in error data storage section 25, the error data are obtained from the error data of nearby measurement point using known interpolation method, and correction data are determined based on the error data thus interpolated. Correction data thus determined are added to the position command to obtain new position command for every interpolation period. The position command is corrected in this manner, and each of the feed axes can be positioned with high precision.

Next, a correction method for correcting the position command by expressing in 3-dimensional coordinate values the correction value that has been computed by the correction data computing section 26, will be described. In case, for example, where, with C axis set at the rotation angle of 0 degree, an attitude error appears in a direction of B-axis which is not proper to the machine, there is a problem that the rotational feed axes need to be rotated considerably in order to correct the attitude error in a direction of B-axis. This problem is referred to as singular point problem in the present invention. The correction method described below is a correction method for circumventing this singular point problem. B-axis is an axis of a rotational feed axis that is parallel to Y-axis.

FIG. 19 is a flow chart showing this correction method. Computation formula for determining the position correction vector based on the attitude and attitude error of a tool, the position and position error of a tool, and the projecting length of a tool according to this method is shown below, where:

L: distance from the command point to the position of tool tip,

[I, J, K]: command attitude of the tool,

[dI, dJ, dK]: attitude error,

[dX1, dY1, dZ1]: position error,

[dX2, dY2, dZ2]: position error of the tool tip produced by the attitude error,

[dX3, dY3, dZ3]: position error of the tool tip, dX2=L×(tan(J+dJ)/((tan(I+dI))²+(tan(J+dJ))²+1)^(1/2)−(tan(J)/((tan(I))²+(tan(J))²+1)^(1/2)) dY2=L×(tan(I+dI)/((tan(I+dI))²+(tan(J+dJ))²+1)^(1/2)−(tan(I)/((tan(I))²+(tan(J))²+1)^(1/2)) dZ2=L×(1/((tan(I+dI))²+(tan(J+dJ))²+1)^(1/2)−(1/((tan(I))²+(tan(J))²+1)^(1/2)) dX3=dX1+dX2 dY3=dY1+dY2 dZ3=dZ1+dZ2

First, at step S0, the command position and the command attitude that are commanded by the position command outputted from interpolation section 23 are recognized. At step S1, error data 34 corresponding to the command position are obtained from the error map. At step S2, the position correction vector for correcting the position error is computed from position error 34 a of error data 34.

On the other hand, from attitude error 34 b of error data 34, at step S5, the attitude correction value is computed. At step S6, the attitude correction value obtained at step S5 is added to the command attitude read out at step S3 to determine the attitude after correction. At step S7, from the attitude after correction obtained at step S6 and the projecting length of the tool, the command point after correction is determined.

At step S4, from the command attitude read out at step S3 and the projecting length of the tool, the command point before correction is determined. At step S8, position correction vector of the command point for correcting the attitude error is computed by subtracting the command point before correction obtained at step S4 from the command point after correction obtained at step S7. This is referred to as the attitude correction vector.

The attitude correction vector is a vector representing the magnitude and direction of the displacement of the tool tip when, with the basal end of the tool held by the main spindle as the control point, the rotational feed axes are rotated so as to correct the attitude error with the control point as the fulcrum.

Finally, at step S9, the attitude correction vector obtained at step S8 and the position correction vector obtained at step S2 are added.

In the present invention, the command point refers to the position of the tool tip (tool tip position), and the tool tip position means the actual position of the tool tip, the position of the processing point of the tool tip portion, the center of the semi-sphere of the tip portion of a ball end mill, etc.

As has been described above, the error of the tool tip position is corrected only by the movement of the linear feed axes, so that the rotational feed axes are not rotated during the correction of attitude error 34 b, and the singular point problem can be circumvented.

Thus, in accordance with the present embodiment, the position error and the attitude error of a machine tool having plural rotational feed axes can be measured and an error map can be prepared. Since, in the error map thus prepared, the position error and the attitude error are stored as separate error data, the position command can be corrected based on the error data, and the tool tip can be positioned to a target position with high precision to permit high precision processing.

The present invention is not limited to the embodiments described above, but can be implemented in various modifications without departing from the scope and spirit of the invention. For example, in the present embodiment, numerical control device 20 comprises a computation section that computes position error and the attitude error at the measurement points based on the measurement data obtained by measurement device 50 and the coordinate values of the measurement points, and error data storage means 25 for storing the position error and the attitude error computed by the computation section in correspondence to the position of the linear feed axes and the rotation angle of the rotational feed axes. It is also possible, in place of numerical control device 20 to use personal computer or other device for the computation section or the error data storage means. 

The invention claimed is:
 1. A method for preparing an error map of a numerically controlled machine tool which has at least one linear feed axis and a plurality of rotational feed axes and in which a main spindle and a table are movable relative to each other, said method comprising steps of: defining a plurality of measurement points in a movable range of said plurality of rotational feed axes; measuring relative position and relative attitude of said main spindle relative to said table at each of said plurality of measurement points; determining position error and attitude error produced when each of said plurality of rotational feed axes is rotated to a respective rotation angle corresponding to each of said plurality of measurement points; and storing said position error and said attitude error in correspondence to said respective rotation angle for each of said plurality of rotational feed axes corresponding to each of said plurality of measurement points, thus generating a multidimensional error map of said position error and said attitude error.
 2. The method for preparing an error map of a numerically controlled machine tool according to claim 1, wherein, in said step of defining a plurality of measurement points, plural measurement regions are defined in said movable range of said linear feed axis, and said measurement points are defined in each measurement region such that at least one of said measurement points in each measurement region has a same coordinate position of said linear feed axis as a measurement point in an adjacent measurement region.
 3. The method for preparing an error map of a numerically controlled machine tool according to claim 1 or 2, wherein, in said step of defining a plurality of measurement points, said measurement points are defined such that a separation between adjoining measurement points is constant everywhere, or a difference of position error or attitude error between adjoining measurement points is constant everywhere.
 4. The method for preparing an error map of a numerically controlled machine tool according to any one of claims 1 to 2, wherein, in said step of measuring said relative position and said relative attitude, a measurement device which has a reference ball of known outer dimension provided on one of said main spindle and said table and a displacement sensor provided on the other are used, and while said at least one linear feed axis is controlled such that a relative position of a center of said reference ball relative to said displacement sensor does not change theoretically when said plurality of rotational feed axes are operated, said plurality of rotational feed axes are each positioned to said respective rotation angle corresponding to each of said plurality of measurement points to measure a displacement of position of said reference ball with said displacement sensor at each of said plurality of measurement points and to determine said relative position and said relative attitude from said displacement of position thus measured and a coordinate value at a time of measurement.
 5. The method for preparing an error map of a numerically controlled machine tool according to any one of claims 1 to 2, wherein, in said step of measuring said relative position and said relative attitude, said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to each of said plurality of measurement points to process a test piece or work piece attached to said table, and a displacement of position, of a processed surface of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to one of said plurality of measurement points and a processed surface of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of rotation angles corresponding to another of said plurality of measurement points, is measured, and said relative position and said relative attitude are determined from said displacement of position thus measured and coordinate values at a time of measurement.
 6. The method for preparing an error map of a numerically controlled machine tool according to any one of claims 1 to 2, wherein, in said step of measuring said relative position and said relative attitude, said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to each of said plurality of measurement points and three surfaces of a test piece or work piece attached to said table are processed with said plurality of rotational feed axes thus positioned, and a difference of position and a difference of inclination between three processed surfaces of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to one of said plurality of measurement points and three processed surfaces of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of rotation angles corresponding to another of said plurality of measurement points are measured with a touch probe attached to said main spindle, and said relative position and said relative attitude are determined from said difference of position and said difference of inclination thus measured and machine coordinate values at a time of measurement.
 7. A method for preparing an error map of a numerically controlled machine tool which at least one linear feed axis and a plurality of rotational feed axes and in which a main spindle and a table are movable relative to each other, said method comprising steps of: defining a plurality of measurement points in a movable range of said at least one linear feed axis and said plurality of rotational feed axes; positioning each of said plurality of rotational feed axes to a respective one of a plurality of rotation angles corresponding to each of said measurement points and processing three mutually orthogonal surfaces of a test piece or work piece in a shape of a rectangular parallelepiped that is attached to said table at each of said plurality of measurement points with each of said plurality of rotational feed axes thus positioned, measuring inclinations of one or more processed reference surfaces of said test piece or work piece, said one or more processed reference surfaces being obtained when said test piece or work piece is processed with each of said plurality of rotational feed axes positioned to a respective one of a plurality of rotation angles corresponding to one of said plurality of measurement points, at each of said plurality of measurement points other than said one of said plurality of measurement points relative to inclinations of said one or more processed reference surfaces measured with each of said plurality of rotational feed axes positioned at a respective one of a plurality of rotation angles corresponding to said one of said plurality of measurement points to determine an attitude error at each plurality of rotation angles corresponding to each of said plurality of measurement points, measuring three mutually orthogonal processed surfaces of said test piece or work piece, processed with each of said plurality of rotational axes positioned to a respective one of said plurality of rotation angles corresponding to a respective one of said plurality of measurement points, at each of said plurality of measurement points to determine, for each plurality of rotation angles corresponding to each of said plurality of measurement points, a position of an intersection point of three planes containing said three mutually orthogonal processed surfaces, determining a position error at each of said plurality of measurement points from a difference of position between an intersection point of three planes containing three mutually orthogonal processed surfaces processed with each of said plurality of rotational feed axes positioned to said respective one of said plurality of rotation angles corresponding to said one of said plurality of measurement points and an intersection point of three planes containing three mutually orthogonal processed surfaces processed with each of said plurality of rotational feed axes positioned to a respective one of a plurality of rotation angles corresponding to another of said plurality of measurement points, and said attitude error, and storing said position error and said attitude error in correspondence to a respective plurality of rotation angles corresponding to each of said plurality of measurement points, in which said position error and said attitude error compose a multidimensional error map.
 8. A method for preparing an error map of a numerically controlled machine tool which has at least one linear feed axis and a plurality of rotational feed axes and in which a main spindle and a table are movable relative to each other, said method comprising: defining a plurality of measurement points in a movable range of said plurality of rotational feed axes; positioning each of said plurality of rotational feed axes to a respective one of a plurality of rotation angles corresponding to each of said plurality of measurement points and processing three mutually orthogonal surfaces of a test piece or work piece in a shape of a rectangular parallelepiped attached to said table with each of said plurality of rotational feed axes thus positioned, measuring processed surfaces of said test piece or work piece to determine, for each of said plurality of measurement points, an inclination of three mutually orthogonal processed surfaces processed at a corresponding one of said plurality of measurement points and a position of intersection point of three planes containing said three mutually orthogonal processed surfaces that were processed at said corresponding one of said plurality of measurement points, determining an attitude error at each of said plurality of measurement points from a difference between inclinations of three mutually orthogonal processed surfaces obtained by processing said test piece or work piece with each of said plurality of rotational feed axes positioned to a respective one of a plurality of rotation angles corresponding to a reference measurement point selected from said plurality of measurement points and inclinations of three mutually orthogonal processed surfaces obtained by processing said test piece or work piece with each of said plurality of rotational feed axes positioned to a respective one of a plurality of rotation angles corresponding to each of said plurality of measurement points, determining a position error at each of said plurality of measurement points from a difference of position between an intersection point of three planes containing said three mutually orthogonal processed surfaces obtained by processing said test piece or work piece with each of said plurality of rotational feed axes positioned to a respective one of a plurality of rotation angles corresponding to said reference measurement point and an intersection point of three planes containing three mutually orthogonal processed surfaces obtained by processing said test piece or work piece with each of said plurality of rotational feed axes positioned to a respective one of a plurality of rotation angles corresponding to each of said plurality of measurement points, and said determined attitude error, and storing said position error and said attitude error in correspondence to a respective plurality of rotation angles corresponding to each of said plurality of measurement points, in which said position error and said attitude error compose a multidimensional error map.
 9. A device for preparing an error map of a numerically controlled machine tool which has at least one linear feed axis and a plurality of rotational feed axes and in which a main spindle and a table are movable relative to each other, said device comprising: a measurement device which has a reference ball provided on one of said main spindle and said table and a sensor provided on the other for measuring a position of said reference ball with said sensor at a desired measurement point, a computation section that computes a position error and an attitude error produced when said plurality of rotational feed axes are rotated at said measurement point, based on measurement data measured with said measurement device and coordinate values of said measurement point, a storage section that stores said position error and said attitude error computed by said computation section in correspondence to rotation angles of said plurality of rotational feed axes at said measurement point, in which said position error and said attitude error compose a multidimensional error map.
 10. A numerically controlled machine tool which has at least one linear feed axes and a rotational feed axis and in which a main spindle and a table are movable relative to each other, said numerically controlled machine tool having an error map preparation function comprising: a measurement device which has a reference ball provided on one of said main spindle and said table and a sensor provided on the other for measuring a position of said reference ball with said sensor at a desired measurement point, a computation section that computes a position error and an attitude error produced when said plurality of rotational feed axes are rotated at said measurement point, based on measurement data measured with said measurement device and coordinate values of said measurement point, and a storage section that stores said position error and said attitude error computed by said computation section in correspondence to rotation angles of said plurality of rotational feed axes at said measurement point, in which said position error and said attitude error compose a multidimensional error map.
 11. A numerically controlled machine tool which has at least one linear feed axis and a plurality of rotational feed axes and in which a main spindle and a table are movable relative to each other, said numerically controlled machine tool having an error map preparation function comprising: a test piece or work piece attached to said table, a measurement device having a sensor provided on said main spindle for measuring processed surfaces of said test piece or work piece with said sensor at a desired measurement point, a computation section that computes a position error and an attitude error produced when said plurality of rotational feed axes are rotated at said measurement point, based on measurement data measured with said measurement device and coordinate values of said measurement point, a storage section for storing said position error and said attitude error computed by said computation section in correspondence to rotation angles of said plurality of rotational feed axes at said measurement point, in which said position error and said attitude error compose a multidimensional error map.
 12. The numerically controlled machine tool having the error map preparation function according to claim 10 or 11, further comprising: a correction section which corrects a command position or position command of said at least one linear feed axis or said plurality of rotational feed axes based on said position error and said attitude error stored in said storage section.
 13. The method for preparing an error map of a numerically controlled machine tool according to claim 3, wherein, in said step of measuring said relative position and said relative attitude, a measurement device which has a reference ball of known outer dimension provided on one of said main spindle and said table and a displacement sensor provided on the other are used, and while said at least one linear feed axis is controlled such that a relative position of a center of said reference ball relative to said displacement sensor does not change theoretically when said plurality of rotational feed axes are operated, said plurality of rotational feed axes are each positioned to said respective rotation angle corresponding to each of said plurality of measurement points to measure a displacement of position of said reference ball with said displacement sensor at each of said plurality of measurement points and to determine said relative position and said relative attitude from said displacement of position thus measured and a coordinate value at a time of measurement.
 14. The method for preparing an error map of a numerically controlled machine tool according to claim 3, wherein, in said step of measuring said relative position and said relative attitude, said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to each of said plurality of measurement points to process a test piece or work piece attached to said table, and a displacement of position, of a processed surface of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to one of said plurality of measurement points and a processed surface of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of rotation angles corresponding to another of said plurality of measurement points, is measured, and said relative position and said relative attitude are determined from said displacement of position thus measured and coordinate values at a time of measurement.
 15. The method for preparing an error map of a numerically controlled machine tool according to claim 3, wherein, in said step of measuring said relative position and said relative attitude, said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to each of said plurality of measurement points and three surfaces of a test piece or work piece attached to said table are processed with said plurality of rotational feed axes thus positioned, and a difference of position and a difference of inclination between three processed surfaces of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of respective rotation angles corresponding to one of said plurality of measurement points and three processed surfaces of said test piece or work piece processed when said plurality of rotational feed axes are positioned to a plurality of rotation angles corresponding to another of said plurality of measurement points are measured with a touch probe attached to said main spindle, and said relative position and said relative attitude are determined from said difference of position and said difference of inclination thus measured and machine coordinate values at a time of measurement. 